package com.gupao.gupaoeduvippattern.javaBase.day01;

import com.gupao.gupaoeduvippattern.javaBase.bean.StudentDO;
import org.junit.jupiter.api.Test;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Administrator
 * @date 2020-12-02 21:49
 */
public class Demo1 {


    @Test
    public void test2(){
        StudentDO sd = new StudentDO();
        sd.setId(new Boolean(true));


    }


    @Test
    public void test(){
        List list = new ArrayList();
        list.add("aa");
        list.add(1);
        list.add('a');
        list.add(true);
        StudentDO sd = new StudentDO();
        list.add(sd);
        System.out.println(list);

    }


    @Test
    public void test1(){
        //声明字符串变量。字符串类型
        String s;
//        System.out.println(s);

        //创建字符串，字符串的构造方法
        char[] a = {'g','o','o','d'};
        String str1 = new String(a);
        System.out.println("构造方法一：" +str1);

        //2
        char[] a2 = {'s','t','u','d','e','n','t'};
        String s2 = new String(a2, 2, 4);
        System.out.println("构造方法二：" + s2);

        //3、相同的字符串常量
        String str11 = "We are student";
        String str22 = "We are student";
        System.out.println(str11 +","+str22+","+ (str11==str22));


    }

}
